package com.gzlz.budejie.utils;

import android.content.Context;
import android.content.SharedPreferences;

import com.gzlz.budejie.MyApplication;

public class SP {
	private static SharedPreferences sp;
	

	public static final String 顶评论 = "pinglun";
	/**
	 * 后加帖子ID,值为  {@link #顶} 或 {@link #踩} .
	 */
	public static final String 顶踩帖子 = "DCTiezi";
	public static final String 顶 = "ding";
	public static final String 踩 = "cai";
	

	public static String getString(String key) {
		if(sp==null)
			sp = MyApplication.getApplication().getSharedPreferences("huancun", Context.MODE_PRIVATE);
		return sp.getString(key, null);
	}
	public static boolean putString(String key,String value) {
		if(sp==null)
			sp = MyApplication.getApplication().getSharedPreferences("huancun", Context.MODE_PRIVATE);
		return sp.edit().putString(key, value).commit();
	}
}
